#ifndef TRIANGLE_SHADER_H
#define TRIANGLE_SHADER_H

#include <glad/glad.h>
#include <string>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
class Shader
{
public:
	Shader(const char *vertexPath, const char *fragmentPath);
	~Shader();
	Shader() = delete;
	void use()const;
	Shader(const Shader &) = delete;
	Shader(const Shader &&) = delete;
	GLuint getProgram()const;
	void setVec4(const char* name,double x,double y,double z,double w)const;
    void setVec3(const std::string &name, const glm::vec3 &value)const;
	void setInt(const char* name,int value)const;
	void setFloat(const char* name,float value)const;
	void setMat4(const char* name,const glm::mat4& mat)const;
private:
	static GLuint compile(const char* path,GLuint type);
	static GLuint link(GLuint &vertexShader,GLuint &fragmentShader);
private:
	GLuint m_id;
};


#endif //TRIANGLE_SHADER_H
